From: Roan Kattouw Date: Mon, 27 Apr 2009 14:21:16 +0000 (+0000) Subject: API: Fix regression from r32224 with caused bug 18597 (internal error for empty gener... X-Git-Tag: 1.31.0-rc.0~41967 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=e484ef763dc3da3e98ff1f2ebd3f8aa6309d8cb5;p=lhc%2Fweb%2Fwiklou.git API: Fix regression from r32224 with caused bug 18597 (internal error for empty generator= parameter) --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 24b9dca4c2..05900b190e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -437,6 +437,7 @@ The following extensions are migrated into MediaWiki 1.15: users * (bug 13049) "API must be accessed from the primary script entry point" error * (bug 18601) generator=backlinks returns invalid continue parameter +* (bug 18597) Internal error with empty generator= parameter === Languages updated in 1.15 === diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index fc221bd63a..4f86832f1a 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -610,7 +610,7 @@ abstract class ApiBase { * @return mixed (allowMultiple ? an_array_of_values : a_single_value) */ protected function parseMultiValue($valueName, $value, $allowMultiple, $allowedValues) { - if( trim($value) === "" ) + if( trim($value) === "" && $allowMultiple) return array(); $sizeLimit = $this->mMainModule->canApiHighLimits() ? self::LIMIT_SML2 : self::LIMIT_SML1; $valuesList = explode('|', $value, $sizeLimit + 1);